home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14221 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: jpmorgan.com!usenet
  2. From: Joe Borkoles <jborkole@jpmorgan.com>
  3. Newsgroups: comp.lang.c++,comp.lang.object,comp.lang.eiffel,comp.lang.smalltalk
  4. Subject: programming language sensitive design
  5. Date: Fri, 29 Mar 1996 14:35:44 +0000
  6. Organization: JP Morgan
  7. Message-ID: <315BF540.2781E494@jpmorgan.com>
  8. NNTP-Posting-Host: gd-dba7.uk.jpmorgan.com
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m)
  13.  
  14. In an informal presentation by a relatively high level patterns luminary the audience was asked to write the C++ code for
  15. a OrderSet, implmented in terms of a binary tree. The OSet member functions were provided but nothing else. The exersise
  16. was of course about recognising and using a pattern. Everyone used a basic varient of a simple node class and a OSet
  17. class. However by using the composite pattern a different design resulted. There were 3 node classes, EmptyNode,
  18. BranchNode and LeafNode. Inserting to an empty node created a new LeafNode, inserting to a LeafNode created a BranchNode
  19. and added itself to the branch. This is quite neat. The statement was made that the author of the design would have
  20. choosen to use this design in a Smalltalk environment and not in a C++ one. At this point I had to ask why. He was very
  21. evasive and didn't wish to answer. Howevever we reached somekind of agreement that the traditional C++ development
  22. community would be 'more' comfortable with the traditional design. ie there was no technical reason, only a social one.
  23. Any thoughts on this. I was actually quite disturbed by it.
  24.